package com.quick.im.client.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;

import com.quick.im.common.entity.domian.MessageRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 一对一消息表 Mapper 接口
 * </p>
 *
 * @author xhh
 * @since 2024-12-12
 */
@Mapper
public interface MessageRecordMapper extends BaseMapper<MessageRecord> {


    @Select("select * from message_to_one ${ew.customSqlSegment}")
    List<MessageRecord> listMessageToOne (@Param(Constants.WRAPPER) QueryWrapper<MessageRecord> queryWrapper);


    @Select("select * from message_to_one where id = #{id} ")
    MessageRecord getMessageToOneById(Integer id);
}

